'use strict';

/**
 * @ngdoc function
 * @name jgappApp.controller:UserUpdatelogCtrl
 * @description
 * # UserUpdatelogCtrl
 * Controller of the jgappApp
 */
angular.module('jgappApp')
    .controller('UserUpdatelogCtrl', function($scope,Util, DataService, openApi) {
        var vm = this;
        vm.curentTab = -1
        vm.init = function() {
            vm.getUpdateLog()
            vm.getversionNo()
        }
        vm.getUpdateLog = function() {
            var param = {};
            param.clientType = (Util.getPlatform()).toLowerCase();
            DataService.getData(openApi.updatelog, param).then(function(data) {
                vm.logList = data;
            })
        }
        vm.getversionNo = function() {
            var param = {};
            vm.versionNo=NativeUtil.use("getAppVersion");
        }
        vm.isActiveTab = function(index) {
            vm.curentTab == index
        }
        vm.showsection = function(index) {
            if(vm.curentTab == index){
                vm.curentTab = -1
            }else{
                vm.curentTab = index
            }
        }
        vm.init();
    });
